<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统设置 - 1024导航后台</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#3B82F6',
                        secondary: '#10B981',
                        accent: '#F59E0B',
                        dark: '#1F2937',
                        light: '#F9FAFB',
                        danger: '#EF4444'
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .sidebar-active {
                @apply bg-primary/10 text-primary border-l-4 border-primary;
            }
            .setting-card {
                @apply bg-white rounded-xl shadow-sm p-6 mb-6 transition-all duration-300 hover:shadow-md;
            }
            .form-label {
                @apply block text-sm font-medium text-gray-700 mb-1;
            }
            .form-input {
                @apply w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary;
            }
        }
    </style>
</head>

<body class="bg-gray-50 font-sans text-gray-800 flex h-screen overflow-hidden">
    <!-- 侧边栏导航 -->
    <aside
        class="w-64 bg-white shadow-sm h-full border-r border-gray-200 flex-shrink-0 hidden md:block overflow-y-auto">
        <div class="p-5 border-b border-gray-200">
            <div class="text-primary text-xl font-bold">1024<span class="text-secondary">导航</span></div>
            <p class="text-xs text-gray-500 mt-1">管理员后台</p>
        </div>

        <nav class="p-4">
            <p class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3 px-3">主菜单</p>
            <ul class="space-y-1">
                <li>
                    <a href="admin_index.html"
                        class="flex items-center px-3 py-3 text-sm text-gray-700 hover:bg-gray-50 rounded-md transition-colors">
                        <i class="fa fa-tachometer w-5 text-center mr-3"></i>
                        <span>控制台</span>
                    </a>
                </li>
                <li>
                    <a href="admin_resource_manager.html"
                        class="flex items-center px-3 py-3 text-sm text-gray-700 hover:bg-gray-50 rounded-md transition-colors">
                        <i class="fa fa-th-large w-5 text-center mr-3"></i>
                        <span>资源管理</span>
                    </a>
                </li>
                <li>
                    <a href="#"
                        class="flex items-center px-3 py-3 text-sm text-gray-700 hover:bg-gray-50 rounded-md transition-colors">
                        <i class="fa fa-users w-5 text-center mr-3"></i>
                        <span>用户管理</span>
                    </a>
                </li>
            </ul>

            <p class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3 px-3 mt-8">系统设置</p>
            <ul class="space-y-1">
                <li>
                    <a href="#" class="sidebar-active flex items-center px-3 py-3 text-sm rounded-md">
                        <i class="fa fa-cog w-5 text-center mr-3"></i>
                        <span>网站设置</span>
                    </a>
                </li>
                <li>
                    <a href="#"
                        class="flex items-center px-3 py-3 text-sm text-gray-700 hover:bg-gray-50 rounded-md transition-colors">
                        <i class="fa fa-shield w-5 text-center mr-3"></i>
                        <span>安全设置</span>
                    </a>
                </li>
                <li>
                    <a href="#"
                        class="flex items-center px-3 py-3 text-sm text-gray-700 hover:bg-gray-50 rounded-md transition-colors">
                        <i class="fa fa-bell w-5 text-center mr-3"></i>
                        <span>通知管理</span>
                    </a>
                </li>
                <li>
                    <a href="#"
                        class="flex items-center px-3 py-3 text-sm text-gray-700 hover:bg-gray-50 rounded-md transition-colors">
                        <i class="fa fa-plug w-5 text-center mr-3"></i>
                        <span>插件管理</span>
                    </a>
                </li>
            </ul>
        </nav>
    </aside>

    <!-- 主内容区 -->
    <div class="flex-1 flex flex-col overflow-hidden">
        <!-- 顶部导航 -->
        <header class="bg-white shadow-sm h-16 border-b border-gray-200 flex items-center justify-between px-6 z-10">
            <div class="flex items-center">
                <button class="md:hidden mr-4 text-gray-600">
                    <i class="fa fa-bars text-xl"></i>
                </button>
                <h1 class="text-lg font-semibold">系统设置</h1>
            </div>

            <div class="flex items-center space-x-4">
                <div class="relative">
                    <button class="text-gray-600 hover:text-primary transition-colors relative">
                        <i class="fa fa-bell text-xl"></i>
                        <span
                            class="absolute -top-1 -right-1 w-4 h-4 bg-danger rounded-full text-white text-xs flex items-center justify-center">3</span>
                    </button>
                </div>

                <div class="relative group">
                    <button class="flex items-center space-x-2">
                        <img src="https://picsum.photos/id/1005/40/40" alt="管理员头像"
                            class="w-8 h-8 rounded-full object-cover">
                        <span class="text-sm font-medium hidden md:inline-block">管理员</span>
                        <i class="fa fa-angle-down text-gray-500"></i>
                    </button>
                    <div
                        class="absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg py-2 z-10 hidden group-hover:block">
                        <a href="profile.html" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">个人资料</a>
                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">账号设置</a>
                        <div class="border-t border-gray-100 my-1"></div>
                        <a href="#" class="block px-4 py-2 text-sm text-red-600 hover:bg-gray-100">退出登录</a>
                    </div>
                </div>
            </div>
        </header>

        <!-- 页面内容 -->
        <main class="flex-1 overflow-y-auto p-6 bg-gray-50">
            <div class="max-w-6xl mx-auto">
                <!-- 设置导航 -->
                <div class="bg-white rounded-xl shadow-sm mb-6">
                    <div class="flex flex-wrap border-b border-gray-100">
                        <button
                            class="px-6 py-4 text-sm transition-colors border-b-2 border-primary text-primary font-medium">
                            基本设置
                        </button>
                        <button
                            class="px-6 py-4 text-sm transition-colors border-b-2 border-transparent text-gray-600 hover:text-gray-900">
                            外观设置
                        </button>
                        <button
                            class="px-6 py-4 text-sm transition-colors border-b-2 border-transparent text-gray-600 hover:text-gray-900">
                            功能设置
                        </button>
                        <button
                            class="px-6 py-4 text-sm transition-colors border-b-2 border-transparent text-gray-600 hover:text-gray-900">
                            缓存设置
                        </button>
                    </div>
                </div>

                <!-- 网站基本设置 -->
                <div class="setting-card">
                    <h2 class="text-lg font-bold mb-5">网站基本信息</h2>
                    <form class="space-y-6">
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                            <div>
                                <label for="siteName" class="form-label">网站名称</label>
                                <input type="text" id="siteName" value="1024导航" class="form-input">
                            </div>
                            <div>
                                <label for="siteDomain" class="form-label">网站域名</label>
                                <input type="text" id="siteDomain" value="https://1024nav.com" class="form-input">
                            </div>
                            <div class="md:col-span-2">
                                <label for="siteDescription" class="form-label">网站描述</label>
                                <textarea id="siteDescription" rows="3"
                                    class="form-input">精选互联网优质资源，打造高效便捷的导航平台，助力你的工作与学习。</textarea>
                            </div>
                            <div>
                                <label for="siteKeywords" class="form-label">网站关键词</label>
                                <input type="text" id="siteKeywords" value="导航网站,资源导航,开发工具,学习资源,设计资源"
                                    class="form-input">
                            </div>
                            <div>
                                <label for="siteCopyright" class="form-label">版权信息</label>
                                <input type="text" id="siteCopyright" value="© 2023 1024导航. 本站资源仅供学习交流使用"
                                    class="form-input">
                            </div>
                        </div>

                        <div class="border-t border-gray-100 pt-5">
                            <button type="submit"
                                class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors">
                                保存设置
                            </button>
                        </div>
                    </form>
                </div>

                <!-- 网站LOGO设置 -->
                <div class="setting-card">
                    <h2 class="text-lg font-bold mb-5">网站LOGO设置</h2>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                        <div>
                            <h3 class="text-sm font-medium text-gray-700 mb-3">PC端LOGO</h3>
                            <div
                                class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center hover:border-primary transition-colors">
                                <img src="https://picsum.photos/id/237/200/80" alt="网站LOGO"
                                    class="max-h-16 mx-auto mb-3">
                                <p class="text-sm text-gray-500 mb-3">建议尺寸：200x80px，支持PNG、JPG格式</p>
                                <button
                                    class="px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors">
                                    <i class="fa fa-upload mr-1"></i> 上传新LOGO
                                </button>
                            </div>
                        </div>
                        <div>
                            <h3 class="text-sm font-medium text-gray-700 mb-3">移动端LOGO</h3>
                            <div
                                class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center hover:border-primary transition-colors">
                                <img src="https://picsum.photos/id/237/80/80" alt="移动端LOGO"
                                    class="max-h-16 mx-auto mb-3 rounded-full">
                                <p class="text-sm text-gray-500 mb-3">建议尺寸：80x80px，支持PNG、JPG格式</p>
                                <button
                                    class="px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors">
                                    <i class="fa fa-upload mr-1"></i> 上传新LOGO
                                </button>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 联系方式设置 -->
                <div class="setting-card">
                    <h2 class="text-lg font-bold mb-5">联系方式设置</h2>
                    <form class="space-y-6">
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                            <div>
                                <label for="contactEmail" class="form-label">联系邮箱</label>
                                <input type="email" id="contactEmail" value="support@1024nav.com" class="form-input">
                            </div>
                            <div>
                                <label for="contactWechat" class="form-label">微信公众号</label>
                                <input type="text" id="contactWechat" value="1024导航" class="form-input">
                            </div>
                            <div>
                                <label for="contactGithub" class="form-label">GitHub地址</label>
                                <input type="text" id="contactGithub" value="github.com/1024nav" class="form-input">
                            </div>
                            <div>
                                <label for="contactPhone" class="form-label">联系电话（选填）</label>
                                <input type="text" id="contactPhone" placeholder="请输入联系电话" class="form-input">
                            </div>
                        </div>

                        <div class="border-t border-gray-100 pt-5">
                            <button type="submit"
                                class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors">
                                保存设置
                            </button>
                        </div>
                    </form>
                </div>

                <!-- 缓存清理 -->
                <div class="setting-card">
                    <h2 class="text-lg font-bold mb-5">缓存管理</h2>
                    <div class="bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6">
                        <div class="flex">
                            <div class="flex-shrink-0">
                                <i class="fa fa-info-circle text-amber-500 mt-0.5"></i>
                            </div>
                            <div class="ml-3">
                                <h3 class="text-sm font-medium text-amber-800">清理缓存提示</h3>
                                <div class="mt-2 text-sm text-amber-700">
                                    <p>清理缓存会删除所有临时文件，可能会暂时影响网站性能，建议在访问量较少时进行操作。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="flex flex-wrap gap-4">
                        <button
                            class="px-4 py-2 bg-danger text-white rounded-md hover:bg-danger/90 transition-colors flex items-center">
                            <i class="fa fa-trash mr-2"></i> 清理全部缓存
                        </button>
                        <button
                            class="px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors flex items-center">
                            <i class="fa fa-refresh mr-2"></i> 刷新页面缓存
                        </button>
                        <button
                            class="px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors flex items-center">
                            <i class="fa fa-database mr-2"></i> 优化数据库
                        </button>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <!-- 回到顶部按钮 -->
    <button id="backToTop"
        class="fixed bottom-6 right-6 w-12 h-12 rounded-full bg-primary text-white shadow-lg flex items-center justify-center opacity-0 invisible transition-all duration-300">
        <i class="fa fa-arrow-up"></i>
    </button>

    <script>
        // 回到顶部按钮功能
        const backToTopBtn = document.getElementById('backToTop');

        window.addEventListener('scroll', () => {
            if (window.scrollY > 300) {
                backToTopBtn.classList.remove('opacity-0', 'invisible');
                backToTopBtn.classList.add('opacity-100', 'visible');
            } else {
                backToTopBtn.classList.remove('opacity-100', 'visible');
                backToTopBtn.classList.add('opacity-0', 'invisible');
            }
        });

        backToTopBtn.addEventListener('click', () => {
            window.scrollTo({
                top: 0,
                behavior: 'smooth'
            });
        });

        // 移动端侧边栏切换
        const menuButton = document.querySelector('button.md\\:hidden');
        const sidebar = document.querySelector('aside');

        menuButton.addEventListener('click', function () {
            sidebar.classList.toggle('hidden');
            sidebar.classList.toggle('fixed');
            sidebar.classList.toggle('z-50');
            sidebar.classList.toggle('w-64');
        });
    </script>
</body>

</html>